package com.coffee.sku.service.sku.dao;


import com.coffee.sku.api.sku.query.SkuCategoryAttributeQuery;
import com.coffee.sku.service.sku.bean.SkuCategoryAttribute;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SkuCategoryAttributeDao {
    public SkuCategoryAttribute findById(Integer id);

    public SkuCategoryAttribute findByIdForUpdate(Integer id);

    public List<SkuCategoryAttribute> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") SkuCategoryAttributeQuery param);

    public Integer countGroupByCategoryId(@Param("param") SkuCategoryAttributeQuery param);

    public List<SkuCategoryAttribute> page(@Param("param") SkuCategoryAttributeQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<Integer> pageGroupByCategoryId(@Param("param") SkuCategoryAttributeQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<SkuCategoryAttribute> list(@Param("param") SkuCategoryAttributeQuery param);

    public SkuCategoryAttribute findFirst(@Param("param") SkuCategoryAttributeQuery param);

    public Integer insert(SkuCategoryAttribute param);

    Integer insertBatch(List<SkuCategoryAttribute> list);

    public void updateById(@Param("param") SkuCategoryAttribute param);

    public void updateByCategoryId(@Param("param") SkuCategoryAttribute param);

    public Integer deleteById(Integer id);

    public Integer deleteByCategoryId(@Param("list") List<Integer> idList, @Param("categoryId") Integer categoryId);

}